import { Image, Text, View } from "react-native";

interface Prop {
  uri?: string,
  text?: string,
  isText?:boolean,
}

// 空组件
const Index = ({ uri = "https://img.yzcdn.cn/vant/custom-empty-image.png", text = "暂无数据",isText = false }: Prop) => {
  return (
    <View style={{marginTop:30,width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}>
      <Image
        style={{width:"50%",height:100}}
        resizeMode="contain"
        source={{
        uri
      }} />
      {
        isText?(
          <Text
            style={{fontSize:16,color:'#aaa',marginTop:10}}>
            {text}
          </Text>
        ):null
      }
    </View>
  );
};

export default Index


